{:W('Template/top')}
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：订单管理&gt;<a href="{:U('Order/planeTicketList',array('id'=>I('get.id')))}">机票产品订单</a>&gt;订单详情
        </div>
        <div class="cTitle2">订单详情</div>
        <div class="orderDetail">
            <h5><b>&nbsp;航程信息</b></h5>
            <table width="100%" class="table table-bordered table-hover">
                <input type="hidden" id="refundFlightTicket" value="{:U('Order/refundFlightTicket')}">
                <tr>
                    <th>编号</th>
                    <th>航班日期</th>
                    <th>起降时间</th>
                    <th>航程信息</th>
                    <th>航班信息</th>
                    <th>票面价</th>
                    <th>结算价</th>
                    <th>基建费</th>
                    <th>燃油税</th>
                </tr>
                <tr>
                    <td class='text-c5'>{$list.0.order_flight_id}</td>
                    <td class='text-c5'>{$list.0.dep_date}</td>
                    <td class='text-c1'>{$list.0.dep_time|substr=0,2}:{$list.0.dep_time|substr=2,2} -
                        {$list.0.arr_time|substr=0,2}:{$list.0.arr_time|substr=2,2}
                    </td>
                    <td class='text-c5'>{$list.0.dep_code|codeToAirport} {$list.0.dep_code} -
                        {$list.0.arr_code|codeToAirport} {$list.0.arr_code}
                    </td>
                    <td class='text-c1'>{$list.0.flight_no|substr=0,2|nameToAirLine} {$list.0.flight_no}</td>
                    <td class='text-c5'>{$list.0.par_price|getYuan}</td>
                    <td class='text-c5'>{$list.0.settle_price|getYuan}</td>
                    <td class='text-c5'>{$list.0.airport_tax|getYuan}</td>
                    <td class='text-c5'>{$list.0.fuel_tax|getYuan}</td>
                </tr>
            </table>
            <p>&nbsp;</p>
            <h5><b>&nbsp;乘客信息</b></h5>
            <table class="cTable table-hover" width="100%">
                <tr>
                    <th width="5%">编号</th>
                    <th width="8%">乘客姓名</th>
                    <th width="8%">证件类型</th>
                    <th width="10%">证件号码</th>
                    <th width="8%">乘客类型</th>
                    <th width="10%">票号</th>
                    <th width="8%">票面价</th>
                    <th width="8%">结算价</th>
                    <!--<th width="8%">基建费</th>-->
                    <!--<th width="8%">燃油税</th>-->
                    <th width="8%">退款时间</th>
                    <th width="8%">退款金额</th>
                    <th width="12%">状态</th>
                    <th width="10%">操作</th>
                </tr>
                <foreach name="list" item="vo">
                    <tr>
                        <td>{$vo.id}</td>
                        <td class="text-c1">{$vo.passenger_name}</td>
                        <td class="text-c5">
                            <if condition="$vo['identity_type'] eq 1">
                                身份证
                                <elseif condition="$vo['identity_type'] eq 2"/>
                                护照
                                <elseif condition="$vo['identity_type'] eq 3"/>
                                军官证
                                <elseif condition="$vo['identity_type'] eq 4"/>
                                士兵证
                                <elseif condition="$vo['identity_type'] eq 5"/>
                                台胞证
                                <else/>
                                其他
                            </if>
                        </td>
                        <td class="text-c1">{$vo.identity_no}</td>
                        <td class='text-c5'>
                            <if condition="$vo['passenger_type'] eq 0">
                                成人
                                <else/>
                                儿童
                            </if>
                        </td>
                        <td>{$vo.ticket_no}</td>
                        <td>{$vo.par_price|getYuan} + {$vo.airport_tax|getYuan} + {$vo.fuel_tax|getYuan}</td>
                        <td>{$vo.settle_price|getYuan} + {$vo.airport_tax|getYuan} + {$vo.fuel_tax|getYuan}</td>
                        <!--<td>{$vo.airport_tax|getYuan}</td>-->
                        <!--<td>{$vo.fuel_tax|getYuan}</td>-->
                        <td>{$vo.refund_time}</td>
                        <td>{$vo.refund_fee|getYuan}</td>
                        <td>
                            <if condition="$vo.state eq 1"><span style="color:red">未提交</span>
                                <elseif condition="$vo.state eq 2"/>
                                <span style="color:blue">已付款</span>
                                <elseif condition="$vo.state eq 3"/>
                                <span style="color:darkgreen">已出票</span>
                                <elseif condition="$vo.state eq 4"/>
                                <span style="color:red">已取消</span>
                                <elseif condition="$vo.state eq 5"/>
                                <span style="color:darkgreen">已退票,退款成功</span>
                                <elseif condition="$vo.state eq 6"/>
                                <span style="color:red">出票失败</span>
                                <elseif condition="$vo.state eq 7"/>
                                <span style="color:blue">预定失败</span>
                                <elseif condition="$vo.state eq 8"/>
                                <span style="color:blue">退票失败</span>
                                <elseif condition="$vo.state eq 9"/>
                                <span style="color:darkgreen">退票中,待退款</span>
                                <elseif condition="$vo.state eq 10"/>
                                <span style="color:darkgreen">有取消</span>
                                <elseif condition="$vo.state eq 11"/>
                                <span style="color:red">有退票</span>
                                <elseif condition="$vo.state eq 12"/>
                                <span style="color:red">已删除</span>
                                <elseif condition="$vo.state eq 14"/>
                                <span style="color:#f08519">已预订,待付款</span>
                                <elseif condition="$vo.state eq 15"/>
                                <span style="color:#f08519">已预订,付款中</span>
                            </if>
                        </td>
                        <td>
                            <div class="btn-group">
                                <button type="button" class="btn btn-default dropdown-toggle"
                                        data-toggle="dropdown" aria-expanded="false">
                                    操作<span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <if condition="($Think.session.role_id eq 1)">
                                    <li>
                                        <a href="javascript:void(0)"
                                           onclick="refundFlightTicket({$vo.id}, {$vo.order_flight_id})">已退票,退票成功</a>
                                    </li>
                                    </if>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </foreach>
            </table>
        </div>
    </div>
</div>

<div class="modal fade" id="myModalEdit" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width:300px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close"
                        data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    填写退款金额
                </h4>
            </div>
            <div class="modal-body">
                退款金额：
                <input type="text" class="refund_fee form-control" style="border:1px solid #e5e5e5">
            </div>
            <div class="modal-footer">
                <div class="pull-right">
                    <button type="button" class="btn btn-primary doSubmitRefundFlightTicket">
                        确定
                    </button>
                    <button type="button" class="btn btn-default cancel"
                            data-dismiss="modal">关闭
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>

{:W('Template/bottom')}
<script>
    $(function () {
        //审核产品切换
        $('.order-Tb').not(".order-Tb:first").hide();
        $('.top a:first').addClass('current');
        $('.top a').click(function () {
            var id = $(this).index();
            $('.top a').removeClass('current');
            $(this).addClass('current');
            $('.order-Tb').hide();
            $('.order-Tb').eq(id).show();
        });
    })
</script>
</body>
</html>